<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ page import="crm.model.Salearea" %>
<%@ page import="crm.control.SaleareaControl"%>
<%@ page import="java.util.*"  %>
<html>
<body>
<% 
request.setCharacterEncoding("UTF-8"); 
Salearea salearea = new Salearea(); 

String area_name = request.getParameter("area_name"); 
salearea.setArea_name(area_name); 
 
String sale_target = request.getParameter("sale_target"); 
salearea.setSale_target(sale_target); 
 
String competitor = request.getParameter("competitor"); 
salearea.setCompetitor(competitor); 
 
 
SaleareaControl sc = new SaleareaControl(); 
 
if(sc.insertSalearea(salearea)) 
{ 
	%>	
<script language = "javascript">
if(window.confirm("录入成功，是否继续公告？"))
window.location.href = "salearea_add.jsp";
else
window.location.href = "salearea.jsp";
</script>
<%} else { %>
<script language="javascript">
if(window.confirm("录入失败，是否继续录入？"))
window.location.href = "salearea_add.jsp";
else
window.location.href = "salearea.jsp";
</script>
<%
	}
%>
</body>
</html>
